<?php
$service  = new SoapClient("http://208.74.72.210:8080/EnticeWS/services/billing3?wsdl");

$key = 'pass';
$key = mkResllerKey($key);

//041565409351933
//$data = $service->getSubscriber('12',$key, '04128582369454235');
//acct_id = 283
//cust_id = 4128

//041287165256993
$cust_id = '4156';
$acct_id = '283';

$xml = new SimpleXMLElement('<EnticeRequest></EnticeRequest>');
	$xmldata = $xml->addChild('data');
		$row = $xmldata->addChild('row');
			$row->addChild('ACCT_ID',$acct_id);
			$row->addChild('CUST_ID',$cust_id);
			$row->addChild('FIRST_NAME','tuan' );
			$row->addChild('LAST_NAME','tuan' );
			$row->addChild('LIMIT',6);
			$row->addChild('USER_NAME','tuan');
			$row->addChild('PASSWORD','tuan');
			$row->addChild('STATUS','6');
			$row->addChild('TTL','6');
				$contact = $row->addChild('ANILIST');
                    $ani = $contact->addChild('ANI');
                        $ani->addChild('NUMBER', 1111111111);
                        $ani->addChild('PIN', 111);
                    $ani = $contact->addChild('ANI');
                        $ani->addChild('NUMBER', 2222222222);
                        $ani->addChild('PIN', 222);
					


$data = $service->addANISubscriber('12',$key,$xml->asXML(),'bao');

//header('Content-type: text/xml');
var_dump($data);

function mkResllerKey($key)
{
	$dt = gmdate("m/d/Y", time());
	$key =substr($dt,0,6).$key.substr($dt, 5);
	return md5($key);
}